home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Mag HDD Backup
/
Amiga Mag HDD Backup.zip
/
Amiga Mag HDD Backup
/
Alexander.img.bin
/
Alexander.img
/
***9.11 All NEWer important
/
10.2
/
Callaway⁄Dec ARexx
/
austime.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1983-05-04
|
1KB
|
47 lines
/* AUSTIME.REXX Convert to time in Australia NSW */
/* Copyright 1994 by Merrill Callaway */
datenow=DATE()
PARSE VAR datenow day month year
leap=0
IF year//4=0 THEN leap=1
daynow=DATE(d)
IF (daynow>93+leap) & (daynow< 303 + leap) THEN add=16
ELSE add=18
SAY 'Input time of day here. hh [Enter]=time now.'
PULL timenow
PARSE VAR timenow timenow ':'
PARSE VAR timenow timenow '.'
IF timenow= '' THEN DO
timenow=time()
daynow=DATE(w)
END
ELSE DO
daynow='today'
IF timenow=0 | timenow=24 THEN daynow='midnight'
timenow=format(timenow,2,2)
END
PARSE VAR timenow hours +2 minutes +3 seconds
IF hours+add<24 THEN DO
hoursthere=hours+add
daythere='today.'
IF timenow='00:00' THEN daythere='same day.'
END
ELSE DO
hoursthere=(hours+add)//24
daythere='tomorrow.'
IF timenow='24:00' THEN daythere='same day.'
END
IF minutes = '' THEN hoursthere=FORMAT(hoursthere,2,2)
SAY 'Here: 'timenow daynow'. ==> Australia: 'hoursthere||minutes||seconds daythere
EXIT
format: PROCEDURE
PARSE ARG num, before, after
num=RIGHT(num,before,0)
num=num':'COPIES('0',after)
RETURN num